import time
import calendar

ticks = time.time()
print("当前时间戳为:", ticks)

localtime = time.localtime(time.time())
print("本地时间为 :", localtime)

localtime = time.asctime(time.localtime(time.time()))
print("本地时间为 :", localtime)

print('格式化时间 :', time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
print('格式化时间 :', time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()))

a = "Sat Mar 28 22:24:24 2016"
print(time.mktime(time.strptime(a, "%a %b %d %H:%M:%S %Y")))

cal = calendar.month(2020, 7)
print("以下输出2020年7月份的日历:")
print(cal)
